import request from '@/utils/request'
export function getLogin(data:object){
    return request({
        method:'post',
        url:'/login',
        data
    })
}
export function getRegister(data:object){
    return request({
        method:'post',
        url:'/register',
        data
    })
}
export function getFindMy(){
    return request({
        method:'get',
        url:'/findMy',
        params:{
            tokenString : localStorage.getItem('token'),appkey : `U2FsdGVkX19WSQ59Cg+Fj9jNZPxRC5y0xB1iV06BeNA=`
        }
    })
}
export function getUpdateAvatar(imgtype:any,base:any){
    request({
        method:'post',
        url:'/updateAvatar',
        data:{
            tokenString : localStorage.getItem('token'),appkey : `U2FsdGVkX19WSQ59Cg+Fj9jNZPxRC5y0xB1iV06BeNA=`,
            imgType:imgtype,serverBase64Img:`${base}`
        }
    })
}
export function getupdateNickName(name:object){
    return request({
        method:'post',
        url:'/updateNickName',
        data:{
            tokenString : localStorage.getItem('token'),appkey : `U2FsdGVkX19WSQ59Cg+Fj9jNZPxRC5y0xB1iV06BeNA=`,
            nickName:name
        }
    })
}
export function getupdateDesc(desc:object){
    return request({
        method:'post',
        url:'/updateDesc',
        data:{
            tokenString : localStorage.getItem('token'),appkey : `U2FsdGVkX19WSQ59Cg+Fj9jNZPxRC5y0xB1iV06BeNA=`,
            desc:desc
        }
    })
}
export function getUpdatePassword(news:any,old:any){
    return request({
        method:'post',
        url:'updatePassword',
        data:{
            tokenString : localStorage.getItem('token'),appkey : `U2FsdGVkX19WSQ59Cg+Fj9jNZPxRC5y0xB1iV06BeNA=`,
            password:news,
            oldPassword:old

        }
    })
}